package com.jiahe.video.util;

import com.ulisesbocchio.jasyptspringboot.encryptor.DefaultLazyEncryptor;
import org.jasypt.encryption.StringEncryptor;
import org.springframework.core.env.StandardEnvironment;

public class Jasypt {

    public static void main(String[] args) {
        System.setProperty("jasypt.encryptor.password", "xiongben");
        StringEncryptor stringEncryptor = new DefaultLazyEncryptor(new StandardEnvironment());
        System.out.println("加密： " + stringEncryptor.encrypt("V0FA0Z4FkxQ_mwjVogNLohQ0vV0MuhqCyvu5QcvZ"));
        //System.out.println("解密： " + stringEncryptor.decrypt("N/+f2B9SznK4MUDSp24Upw=="));
    }
}
